<?php namespace App\Service\Admin;


use App\Model\Admin\DepartmentModel;
use App\Service\BaseService;

/**
 * 部门管理-服务类
 * @author LZH
 * @since: 2021/08/12
 * Class DepartmentService
 */
class DepartmentService extends BaseService
{
    /**
     * 构造函数
     * LevelService constructor.
     */
    public function __construct()
    {
        $this->model = new DepartmentModel();
        parent::__construct();
    }
	
	/**
     * 获取数据列表
     * @return array
     * @since 2021/08/12
     * @author LZH
     */
    public function getList()
    {
        // 查询条件
        $map = [];

        // 部门名称
        $name = $this->getRequestParam('name');
        if ($name) {
            $map[] = ['name', 'like', "%{$name}%"];
        }
        return $this->model->getList($map, ["sort" => "asc"]);
    }



}